package com.gitee.wsl.doc.sample.rss.bean

import kotlinx.serialization.Serializable

@Serializable
data class JsonFeed(val version: String? = "https://jsonfeed.org/version/1",
                    val title: String?,
                    val home_page_url: String? = null,
                    val feed_url: String? = null,
                    val description: String? = null,
                    val user_comment: String? = null,
                    val next_url: String? = null,
                    val icon: String? = null,
                    val favicon: String? = null,
                    val author: com.gitee.wsl.doc.sample.rss.bean.JsonFeedAuthor? = null,
                    val expired: Boolean? = null,
                    val hubs: List<com.gitee.wsl.doc.sample.rss.bean.JsonFeedHub>? = null,
                    val items: List<com.gitee.wsl.doc.sample.rss.bean.JsonFeedItem>?,
                    var responseHash :Int = 0
)

@Serializable
data class JsonFeedAuthor(val name: String? = null,
                          val url: String? = null,
                          val avatar: String? = null)

@Serializable
data class JsonFeedItem(var id: String?,
                        val url: String? = null,
                        val external_url: String? = null,
                        val title: String? = null,
                        var content_html: String? = null,
                        var content_text: String? = null,
                        var summary: String? = null,
                        var image: String? = null,
                        val banner_image: String? = null,
                        val date_published: String? = null,
                        val date_modified: String? = null,
                        val author: com.gitee.wsl.doc.sample.rss.bean.JsonFeedAuthor? = null,
                        val tags: List<String>? = null,
                        val attachments: List<com.gitee.wsl.doc.sample.rss.bean.JsonFeedAttachment>? = null,
                        var imageCount:Int?=0,
                        var unfold:Boolean=false)

@Serializable
data class JsonFeedAttachment(val url: String?,
                              val mime_type: String? = null,
                              val title: String? = null,
                              val size_in_bytes: Long? = null,
                              val duration_in_seconds: Long? = null)

@Serializable
data class JsonFeedHub(val type: String?,
                       val url: String?)